Skip to main content
Version: 9.2

Single Panel

The Single Panel widget enables you to embed a chart, metric, or summary panel that has already been created in Qrvey Composer.

Note: Unlike Dashboards, Single Panel widgets do not include the full set of dashboard functionality such as global filters. When embedding a Single Panel widet, only the visualization itself is rendered.

Embeddable Sample

The following sample demonstrates how to quickly embed a single panel in your system.

Important: This example is for testing purposes only.

  • API Key: In production, your API key must never be exposed in the UI. It should only be used in backend-to-backend communication.
  • Minimal Config: The sample uses the minimum set of properties needed for quick testing. Production deployments can require additional properties.
<an-panel config="singlePanelConfig"></an-panel>

<!-- Widget's Configuration Object -->
<script>
var singlePanelConfig = {
"apiKey": "<YOUR_PRIVATE_API_KEY>", // Testing only. Do not expose in production.
"appId": "<APP_ID>",
"domain": "https://<YOUR_QRVEY_DOMAIN>",
"userId": "<USER_ID>",
"qrveyId": "<DATASET_ID>", // Represents the dataset ID
"type": "CHART", // Can also be "METRIC" or "SUMMARY"
"chartId": "<CHART_ID>" // Use metricId if type=METRIC, summaryId if type=SUMMARY
}
</script>

<!-- Widget's Launchers -->
<script type="module" src="<WIDGETS_URL>/qrvey-an-widgets/an-dashboard/andashboard/andashboard.esm.js"></script>
<script nomodule src="<WIDGETS_URL>/qrvey-an-widgets/an-dashboard/andashboard/andashboard.js"></script>

Production Deployment

When deploying to production:

  • Use a qvToken instead of an apiKey.
  • Ensure appId, userId, and qrveyId are passed by means of the token, not hard-coded.
  • clientId, orgId, and orgs are not required for rendering the widget, but can be provided when you want Single Panel widget to act as a gateway for other components (such as Download Manager, Export Data modal, Subscriptions, or personalization).
  • Configure additional properties such as panel, featurePermission, and i18n as needed.
  • Keep the API key securely stored on the server side only.

Configuration Object

PropertyTypeRequiredqvToken SupportDescription
domainStringYesNoQrvey instance URL. Example: https://example.qrvey.com.
qvTokenStringYes (if apiKey is not provided)-----Encrypted token used for secure authentication. Used in production to securely pass all required parameters. Cannot be used with apiKey.
apiKeyStringYes (if qvToken is not provided)NoSecret token for accessing the application. Caution: For testing only; do not use in production UI. Cannot be used with qvToken .
appIdStringYesYesID of the Qrvey application that contains the chart, metric, or summary panel.
userIdStringYes (if not in session cookie)YesID of the Qrvey Composer user that owns the application being embedded. Alternatively, it can be passed in a Qrvey session cookie.
qrveyIdStringYesNoRepresents the dataset ID to be used in the panel.
typeStringYesNoDefines the panel type. Options: CHART, SUMMARY, or METRIC.
chartIdStringYes if type is CHARTNoID of the chart to display.
metricIdStringYes if type is METRICNoID of the metric to display.
summaryIdStringYes if type is SUMMARYNoID of the summary panel to display.
clientIdStringNoYesNot required for rendering. Unique identifier for the tenant end user. Used for personalization and passed to other components such as Download Manager or Export modal.
orgIdStringNoYesNot required for rendering. Organization ID for the end user. Used to pass organization context to other components.
orgsObject ArrayNoOnlyNot required for rendering. Defines users and roles grouped by organization. Used to enable sharing/subscription features in other components.
emailStringNo (required for scheduling/subscriptions)OnlyEmail of the clientId user. Enables scheduling of exports/subscriptions.
panelObjectNoNoAllows configuration of panel features (header, body, footer, styles, and so on). For more information, Panel Object.
userFiltersObjectNoYesCollection of custom filters applied to the panel visualization. For more information, see User Filters.
timezoneStringNoYesTimezone offset applied to dates. For more information, see Configuring Time Zone Settings.
i18nObjectNoNoDefines language for UI text and dataset columns. Supports internationalization. For more information, see i18n Object.
themeIdStringNoNoTheme ID to apply a pre-defined theme. For more information, see Accessing a Theme Programmatically.
featurePermissionObjectNoNoEnables you to create a customized view by showing and hiding specific features. For more information, see Feature Permission Object.
customTokensObjectNoNoAdds personalization with custom tooltips. For more information, see Custom Tokens Example: { "my_header": "Tooltip Header" }.

Orgs

For full details on how orgs work, see Organizations, Ownership, and Subscriptions.

PropertyTypeDescription
orgIdStringThe ID of the organization to which the roles and users are defined next. To list the roles and users in subscribe, this ID should correspond to the user in the session orgId.
usersArrayAn object/array of users to be listed in the subscribe modal. This is not for the current user. Adjust clientId and email accordingly.
users.clientIdStringClient ID of the user.
users.emailStringEmail address of the user.

Example:

const orgs = [
{
orgId: 'ORG_ID',
users: [
{
clientId: 'CLIENT_ID',
email: 'EMAIL'
},
{
clientId: 'CLIENT_ID2',
email: 'EMAIL2'
}
]
}
]

i18n

For more information, see Internationalization, Step by Step.

PropertyTypeRequiredDescription
langStringYesLanguage to use for the UI (example: "es").
localeStringNoLocale code to use for date and number formatting (Example: "es-ES").

Timezone

PropertyTypeRequiredDescription
timezone.offsetString.NoSpecifies the timezone offset. Accepted formats: +03:00, -03, and so on.

Panel

PropertyTypeRequiredDescription
panel.headerObjectNoPanel header options object.
panel.header.visibleBooleanNoDetermines if the panel header is visible. Defaults to true.
panel.header.draggableBooleanNoUsed by Custom View and Metric View panels. If true, the panel header has an icon to drag and drop the panel. Defaults to false in embedded widgets.
panel.header.filterBooleanNoDetermines if the panel header has a filter button to open the Filter Modal widget. Defaults to false in embedded widgets.
panel.header.menuArray/BooleanNoIf it's an array, the panel header displays the options passed through the array. If the value is true, the panel header displays a default menu. Accepted values for the array: EDIT, DOWNLOAD, DUPLICATE, SIZE and DELETE.
(Note: SIZE is used only by Custom View panels).
panel.header.fit_panelBooleanNoSet to true if "fit to panel" button is enabled (false by default).
panel.header.title_prefixStringNoSets a prefix for the title of the panel.
panel.header.externalDownloadArrayNoSet of values to allow external download for defined formats. Used by the Dashboard.
Accepted Values: CSV.
panel.header.sortingBooleanNo, Determines if sorting button is show in the panel header.
panel.header.chartSelectionBooleanNoAllow the user to change the chart type.
panel.header.columnReplacementBooleanNoAllow the user to select and change the columns from the self-service option.
panel.header.columnAggregationBooleanNoAllow the user to select and change the columns aggregates directly from the self-service option.
panel.header.dateGroupingObjectNoAllow the user to change date grouping, for the cases of having a Date type column, their date grouping (shown below). All of them are accessible under Column settings icon.
panel.bodyObjectNoPanel body options object.
panel.body.popupObject.NoPanel body popup options object. Used to show Filter By, See Data and Drill-Down options.
panel.body.popup.itemsArray.NoSet of options to show on the popup. For more information, see panel.body.popup.items properties.
panel.body.popup.items[itemIndex]ObjectNoPopup item options object to use in panel.body.popup.items array.
panel.body.popup.items[itemIndex].labelStringNoOption name. Required for this array.
panel.body.popup.items[itemIndex].actionFunctionNoCustom callback function.
panel.footerObject.NoPanel footer options object.
panel.footer.visibleBoolean.NoDetermines if a panel footer is visible. Defaults to false.
panel.stylesObject.NoStyles options object. These properties extend the current theme.
panel.styles.chartsTitleString.NoSet the charts title color using a hex value.
panel.styles.chartsFontFamilyStringNoSet the charts font family.
panel.styles.axisDataLabelsStringNoSet axis labels color in charts.
panel.styles.dataLabelsString.NoSets a hex color for data labels in charts.
panel.styles.valuesMainStringNoSets a hex color for axis ticks values in charts.
panel.styles.chartsLegendsStringNoSets a hex color for charts legends labels.
panel.styles.chartsTooltipsStringNoSet a hex color for charts tooltips.
panel.styles.tableHeaderFontStringNoSets color for table header texts.
panel.styles.chartsMainStringNoSets color for chart data points like bars, symbols and lines.
panel.styles.themePaletteArrayNoSets up to 20 hex color values for chart data points like bars, symbols and lines.

dateGrouping

// example
dategrouping: {
year: true,
quarter: true,
month: true,
week: true,
quarter_only: true,
month_only: true,
day_only: true,
advancedGrouping: {
day: true,
hour: true,
minute: true,
second: true,
hour_only: true,
minute_only: true,
second_only: true
}
}

panel.body.popup.items

Accepted array items format:

let item = {
label: '<popup_item>', // Required
action: customCallbackFunction(), // Optional
customdrills: <Array> // Optional
}

Example: [{ label: 'SEEDATA' }, { label: 'FILTERBY' }, { label: 'DRILLDOWN' }, { label: 'CUSTOMDRILL' }]

Feature Permission

PropertyTypeRequiredDescription
downloadsObjectNoHide the Export feature, which supports exporting charts, tables, dashboards, and reports to downloadable files (PDF, JPG, CSV, EXCEL, CSV SUMMARY). For single panel, contains hideSchedule.
downloads.hideScheduleBooleanNoIf true, hides the Schedule option in the Export feature (default: false).
featurePermission.hideSubscriptionBooleanNoHide the subscription option in the export modal.
featurePermission.hideSubscribeExternalUsersBooleanNoDisable the option of subscribing users outside of the organization.

Styles

The Single Panel Widget supports customization through CSS variables, allowing you to adapt the look and feel of dashboards to match your application’s design system. This includes control over fonts, colors, spacing, and other UI elements.

By overriding the available style variables, you can achieve a fully branded experience for end users without altering functionality. This is recommended to ensure consistency across embedded dashboards.

For the complete list of available style variables and examples of how to use them, see Customize Widgets Using CSS.